import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.util.AntPathMatcher;

import com.ls.task.support.schedule.quartz.MethodInvokingJobDetailFactoryBean;

public class Main {

	public static void main(String[] args) {
		String 你好 = "ddd";
		System.out.println(你好);

        AntPathMatcher matcher = new AntPathMatcher();
        String antPattern = "/sys/**";
		String input = "/sys1/task/add";
		boolean d = matcher.match(antPattern, input);
        System.out.println(d);
	}
	
	public static void loadBean(ConfigurableApplicationContext configurableApplicationContext, Class cla){
		// 获取bean工厂并转换为DefaultListableBeanFactory  
		DefaultListableBeanFactory defaultListableBeanFactory = (DefaultListableBeanFactory) configurableApplicationContext  
		        .getBeanFactory();  
		  
		// 通过BeanDefinitionBuilder创建bean定义  
		BeanDefinitionBuilder beanDefinitionBuilder = BeanDefinitionBuilder  
		        .genericBeanDefinition(cla);  
		// 设置属性userAcctDAO,此属性引用已经定义的bean:userAcctDAO  
		beanDefinitionBuilder.addPropertyReference("userAcctDAO", "UserAcctDAO");  
		  
		// 注册bean  
		defaultListableBeanFactory.registerBeanDefinition("sdfds",  
		        beanDefinitionBuilder.getRawBeanDefinition()); 
	}
}
